package cn.spring.service;

import cn.spring.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("userService")
public class UserServiceImpl implements  UserService{
//    @Resource(name = "userDao")
    @Resource
    public UserDao dao;

    public UserServiceImpl(){

    }
    public UserServiceImpl(UserDao dao){
        this.dao = dao;
    }

    public UserDao getDao() {
        return dao;
    }
    @Resource
    public void setDao(UserDao dao) {
        this.dao = dao;
    }

    @Override
    public int updateUser() {
        return dao.updateUser();
    }
}
